package com.mystudyCode.service.Impl;

import com.mystudyCode.dao.StudentDao;
import com.mystudyCode.domain.Student;
import com.mystudyCode.service.StudentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author lihai
 * @Description
 * @create 2022/2/4 -23:39
 */
@Service
public class StudentServiceImpl implements StudentService {

    @Resource
    private StudentDao dao;

    @Override
    public int addStudents(Student stu) {
        int num = dao.addStudent(stu);
        return num;
    }

    @Override
    public List<Student> findStudents() {
        List<Student> lis = dao.selectStudent();
        return lis;
    }
}
